import { Component, OnInit, ViewChild, ElementRef, HostListener } from '@angular/core';

@Component({
  selector: 'app-decorators-com',
  template:'<h1 #gree>hello{{name}}</h1>',
  
})
export class DecoratorsComComponent implements OnInit {
  name='john';
  @ViewChild('greet') greetDiv:ElementRef

  @HostListener('click',['$event'])
  onClick(e){
      console.dir(e)
  }

  constructor() { }

  

  ngOnInit() {
  }

}
